@extends('admin.common.option')
@section('content')
<article class="page-container">
	<form class="form form-horizontal" id="formData" method="post"  action="{{url('admin/article',[$info['id']])}}">
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>文章标题：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" class="input-text" name="title" value="{{$info['title']}}" placeholder="文章标题"  >
			</div>
		</div>

		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>分类：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<span class="select-box">
					<select name="category_id" class="select">
						<option value="">请选择</option>
						@foreach($categoryList as $k=>$v)
						<option value="{{$v['id']}}" {{$v['id']==$info['category_id']?'selected':''}}>{{$v['title']}}</option>
						@endforeach
					</select>
				</span> 
			</div>
		</div>

		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-2">是否推荐：</label>
			<div class="formControls col-xs-8 col-sm-9">
			    <input type="radio" id="is_recommend-1" name="is_recommend" value="1" checked>
			    <label for="is_recommend-1">是</label>
			    <input type="radio" id="is_recommend-0" name="is_recommend" value="0" >
			    <label for="is_recommend-0">否</label>
		  	</div>
		</div>
		<br>
		<div id="content">
		    <textarea  name="content" style="display:none;">{!!$info['content']!!}</textarea>
		</div>

		{{ method_field('PATCH')}}
		{{csrf_field()}}
		<div class="row cl">
			<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
				<button  class="btn btn-primary radius" type="submit"><i class="Hui-iconfont">&#xe632;</i> 保存并提交审核</button>
				<button  class="btn btn-default radius" type="button">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
			</div>
		</div>
	</form>
</article>
@include('markdown::encode',['editors'=>['content']])
@endsection
